<!DOCTYPE HTML>
<html>

<head>
<meta charset="utf-8">
<title>Sample</title>
</head>

<body>
<div id="obj" style="width:50px; height:50px; background-color:#DC574E;">Drag me</div>

<script>
document.body.onload = initEvent;
function initEvent() {
	var obj = document.getElementById("obj");
    obj.addEventListener(
            "touchmove", updatePos, false);
}

function updatePos(evt) {
   evt.preventDefault(); // 取消默认的滚动事件   
   var oTouch = evt.targetTouches[0];
   var node = oTouch.target;
   node.style.position = "absolute";
   node.style.left = oTouch.pageX + "px";
   node.style.top = oTouch.pageY + "px";
}
</script>
</body>
</html>
